home *** CD-ROM | disk | FTP | other *** search
- /* Some sample-shapes, that makes usable leafs for trees. */
-
- /*
-
- LEAFSHAPE_00 : simple polygon with some jags
- LEAFSHAPE_01 : a mesh, similar to LEAFSHAPE_00, but not as flat as LEAFSHAPE_00
- LEAFSHAPE_02 : a simple flat pressed sphere
- LEAFSHAPE_03 : a leaf mad of blob, slow to render
-
- LEAF_TEXTURE_SUMMER : a summer-texture
- LEAF_TEXTURE_AUTUMN : a autumn-texture
-
- LEAF_SUMMER_00 : a summer-leaf with LEAFSHAPE_00
- LEAF_SUMMER_01 : a summer-leaf with LEAFSHAPE_01
- LEAF_SUMMER_02 : a summer-leaf with LEAFSHAPE_02
- LEAF_SUMMER_03 : a summer-leaf with LEAFSHAPE_03
-
- LEAF_AUTUMN_00 : a autumn-leaf with LEAFSHAPE_00
- LEAF_AUTUMN_01 : a autumn-leaf with LEAFSHAPE_01
- LEAF_AUTUMN_02 : a autumn-leaf with LEAFSHAPE_02
- LEAF_AUTUMN_03 : a autumn-leaf with LEAFSHAPE_03
- */
-
-
-
-
-
-
-
-
- /* First the winter-section... haha, very short. */
-
- /* Now some shapes without texture */
-
- // simple polygon with some jags
- #declare LEAFSHAPE_00 =
- union {
- polygon {
- 13
- <-1,0,0>,
- <-0.5, 0, 0>
- <0, 0.3, 0>
- <0.5, 0, 0>
- <1,0,0>,
- <0.5,1,0>,
- <1,2,0>,
- <0.3,2,0>,
- <0,3,0>,
- <-0.3,2,0>,
- <-1,2,0>,
- <-0.5,1,0>,
- <-1,0,0>
- }
- cone {
- <0, 0.3, 0>, 0.04, <0, -1, 0>, 0.07
- }
- translate <0, 1, 0>
- }
-
-
-
- // a mesh, similar to LEAFSHAPE_00, but not as flat as LEAFSHAPE_00
- #declare LEAFSHAPE_01 =
- union{
- mesh {
- triangle { < 0.0, 3.0,-0.3>, <-1.0, 1.5, 0.0>, < 0.0, 1.5,-0.2> }
- triangle { <-1.0, 1.5, 0.0>, <-2.0, 1.0,-0.1>, <-1.0, 0.5,-0.1> }
- triangle { <-2.0, 1.0,-0.1>, <-2.5, 0.5,-0.2>, <-2.0, 0.0, 0.0> }
- triangle { <-2.0, 1.0,-0.1>, <-2.0, 0.0, 0.0>, <-1.0, 0.5,-0.1> }
- triangle { <-1.0, 0.5,-0.1>, <-2.0, 0.0, 0.0>, <-1.0,-0.5, 0.0> }
- triangle { < 0.0, 1.5,-0.2>, <-1.0, 1.5, 0.0>, <-1.0, 0.5,-0.1> }
- triangle { < 0.0, 1.5,-0.2>, <-1.0, 0.5,-0.1>, < 0.0, 0.5,-0.1> }
- triangle { < 0.0, 0.5,-0.1>, <-1.0, 0.5,-0.1>, <-1.0,-0.5, 0.0> }
- triangle { < 0.0, 0.5,-0.1>, <-1.0,-0.5, 0.0>, < 0.0,-0.5,-0.1> }
- triangle { <-1.0,-0.5, 0.0>, <-2.0,-1.5, 0.0>, <-1.0,-1.5, 0.1> }
- triangle { <-1.0,-1.5, 0.1>, <-2.0,-1.5, 0.0>, <-1.5,-2.0,-0.1> }
- triangle { <-1.0,-1.5, 0.1>, <-1.5,-2.0,-0.1>, <-1.0,-2.0, 0.1> }
- triangle { <-1.0,-2.0, 0.1>, <-1.5,-2.0,-0.1>, <-0.5,-2.5,-0.2> }
- triangle { < 0.0,-2.0,-0.2>, <-1.0,-2.0, 0.1>, <-0.5,-2.5,-0.2> }
- triangle { < 0.0,-0.5,-0.1>, <-1.0,-0.5, 0.0>, <-1.0,-2.0, 0.1> }
- triangle { < 0.0,-0.5,-0.1>, <-1.0,-2.0, 0.1>, < 0.0,-2.0,-0.2> }
-
- triangle { <-0.0, 3.0,-0.3>, < 1.0, 1.5, 0.0>, <-0.0, 1.5,-0.2> }
- triangle { < 1.0, 1.5, 0.0>, < 2.0, 1.0,-0.1>, < 1.0, 0.5,-0.1> }
- triangle { < 2.0, 1.0,-0.1>, < 2.5, 0.5,-0.2>, < 2.0, 0.0, 0.0> }
- triangle { < 2.0, 1.0,-0.1>, < 2.0, 0.0, 0.0>, < 1.0, 0.5,-0.1> }
- triangle { < 1.0, 0.5,-0.1>, < 2.0, 0.0, 0.0>, < 1.0,-0.5, 0.0> }
- triangle { <-0.0, 1.5,-0.2>, < 1.0, 1.5, 0.0>, < 1.0, 0.5,-0.1> }
- triangle { <-0.0, 1.5,-0.2>, < 1.0, 0.5,-0.1>, <-0.0, 0.5,-0.1> }
- triangle { <-0.0, 0.5,-0.1>, < 1.0, 0.5,-0.1>, < 1.0,-0.5, 0.0> }
- triangle { <-0.0, 0.5,-0.1>, < 1.0,-0.5, 0.0>, <-0.0,-0.5,-0.1> }
- triangle { < 1.0,-0.5, 0.0>, < 2.0,-1.5, 0.0>, < 1.0,-1.5, 0.1> }
- triangle { < 1.0,-1.5, 0.1>, < 2.0,-1.5, 0.0>, < 1.5,-2.0,-0.1> }
- triangle { < 1.0,-1.5, 0.1>, < 1.5,-2.0,-0.1>, < 1.0,-2.0, 0.1> }
- triangle { < 1.0,-2.0, 0.1>, < 1.5,-2.0,-0.1>, < 0.5,-2.5,-0.2> }
- triangle { <-0.0,-2.0,-0.2>, < 1.0,-2.0, 0.1>, < 0.5,-2.5,-0.2> }
- triangle { <-0.0,-0.5,-0.1>, < 1.0,-0.5, 0.0>, < 1.0,-2.0, 0.1> }
- triangle { <-0.0,-0.5,-0.1>, < 1.0,-2.0, 0.1>, <-0.0,-2.0,-0.2> }
- }
- cone {
- <0, -2, -0.2>, 0.07, <0, -3.5, 0>, 0.1
- }
- translate <0, 3.5, 0>
- scale 0.5
- }
-
-
-
- // a simple flat pressed sphere
- #declare LEAFSHAPE_02 =
- union {
- sphere {
- <0,0,0>,2
- scale <0.6,1,0.002>
- translate <0, 2, 0>
- }
- cone {
- <0,0,0>, 0.004, <0,-0.5,0>, 0.012
- }
- translate <0,0.5,0>
- scale 0.65
- }
-
-
-
- // a leaf mad of blob, slow to render
- #declare LEAFSHAPE_03 =
- union {
- blob {
- threshold 1
- sphere { <-0.6, 0.0, 0>, 1.0, 1 }
- sphere { < 0.6, 0.0, 0>, 1.0, 1 }
- sphere { <-0.4, 0.4, 0>, 1.0, 1 }
- sphere { < 0.4, 0.4, 0>, 1.0, 1 }
- sphere { <-0.2, 0.8, 0>, 1.0, 1 }
- sphere { < 0.2, 0.8, 0>, 1.0, 1 }
- sphere { < 0, 1.2, 0>, 0.8, 1 }
- sphere { < 0, 1.4, 0>, 0.5, 1 }
- sphere { < 0, 1.6, 0>, 0.2, 1 }
-
- sphere { <-0.6, 0.0, 0.51>, 1.0, -1 }
- sphere { < 0.6, 0.0, 0.51>, 1.0, -1 }
- sphere { <-0.4, 0.4, 0.51>, 1.0, -1 }
- sphere { < 0.4, 0.4, 0.51>, 1.0, -1 }
- sphere { <-0.2, 0.8, 0.51>, 1.0, -1 }
- sphere { < 0.2, 0.8, 0.51>, 1.0, -1 }
- sphere { < 0, 1.2, 0.51>, 0.8, -1 }
- sphere { < 0, 1.4, 0.51>, 0.5, -1 }
- sphere { < 0, 1.6, 0.51>, 0.2, -1 }
-
- scale <1, 1.2, 0.05>
- }
- cone {
- <0, 0, 0>, 0.04, <0, -1, 0>, 0.07
- }
- translate <0,1,0>
- }
-
-
-
- // The Summer-Texture
-
- #declare LEAF_TEXTURE_SUMMER =
- texture {
- pigment {
- granite
- color_map {
- [0 color rgbt <0.05, 0.8, 0, 0.2>]
- [1 color rgbt <0.05, 0.9, 0, 0.3>]
- }
- scale 0.025
- }
- finish {
- ambient 0.1
- diffuse 0.8
- specular 0.1
- }
- normal {
- bozo 0.1
- scale 0.05
- }
- }
-
-
- // The autumn-Texture
- #declare LEAF_TEXTURE_AUTUMN =
- texture {
- pigment {
- bozo
- color_map {
- [0.0 color rgbt <0.7, 0.6, 0, 0.1>]
- [0.2 color rgbt <0.8, 0.3, 0, 0.1>]
- [0.36 color rgbt <0.8, 0.3, 0, 0.1>]
- [0.4 color rgbt <0.7, 0.3, 0, 1.0>]
- [0.43 color rgbt <0.6, 0.2, 0, 0.1>]
- [0.6 color rgbt <0.6, 0.2, 0, 0.1>]
- [0.8 color rgbt <0.5, 0.5, 0, 0.1>]
- [1.0 color rgbt <0.7, 0.1, 0, 0.1>]
- }
- scale 0.25
- }
- finish {
- ambient 0.1
- diffuse 0.8
- specular 0.1
- }
- normal {
- bozo 0.1
- scale 0.05
- }
- }
-
-
-
-
-
- // The Summer-Leaves
-
- #declare LEAF_SUMMER_00 =
- object {
- LEAFSHAPE_00
- texture { LEAF_TEXTURE_SUMMER }
- }
-
- #declare LEAF_SUMMER_01 =
- object {
- LEAFSHAPE_01
- texture { LEAF_TEXTURE_SUMMER }
- }
-
- #declare LEAF_SUMMER_02 =
- object {
- LEAFSHAPE_02
- texture { LEAF_TEXTURE_SUMMER }
- }
-
- #declare LEAF_SUMMER_03 =
- object {
- LEAFSHAPE_03
- texture { LEAF_TEXTURE_SUMMER }
- }
-
- // The Autumn-Leaves
-
- #declare LEAF_AUTUMN_00 =
- object {
- LEAFSHAPE_00
- texture { LEAF_TEXTURE_AUTUMN }
- }
-
- #declare LEAF_AUTUMN_01 =
- object {
- LEAFSHAPE_01
- texture { LEAF_TEXTURE_AUTUMN }
- }
-
- #declare LEAF_AUTUMN_02 =
- object {
- LEAFSHAPE_02
- texture { LEAF_TEXTURE_AUTUMN }
- }
-
- #declare LEAF_AUTUMN_03 =
- object {
- LEAFSHAPE_03
- texture { LEAF_TEXTURE_AUTUMN }
- }
-
-